package com.zhiyou.app.controller;


import com.zhiyou.app.common.vo.resp.Response;
import com.zhiyou.app.service.IComWalletService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author jonathan.z
 * @since 2025-07-03
 */
@RestController
@RequestMapping("/comWallet")
@Api(tags = "公司钱包管理")
public class ComWalletController {
    @Resource
    private IComWalletService comWalletService;

    @ApiOperation(value = "获取公司钱包")
    public Response getComWallet() {
        return Response.success();
    }

    @ApiOperation(value = "获取公司钱包明细")
    public Response getComWalletDetail() {
        return Response.success();
    }

    @ApiOperation(value = "企业钱包充值")
    @PostMapping("/addComWallet")
    public Response<Boolean> addComWallet(Integer amount) {
        comWalletService.addComWalletAmount(new BigDecimal(amount));
        return Response.successWithData(true);
    }
}
